<template>
	<div class="page result">
		<div class="scroll-view">
			<customHeader :middleTitle="header" rightTitle="完成" @leftCallBack="complete" @rightCallBack="complete" />
			<div class="page-body">
				<result type="success" title="绑定成功" msg="此二维码已经可以正常收款" />
				<div class="btn-wrap">
					<div class="btn" @click="linkTo">查看收款码</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
import Vue from "vue";
import customHeader from "../../components/header/header";
import result from "../../components/result/result";
export default {
  name: "bindingSuccess",
  data() {
    return {
      code: "",
      shopId: 0,
      header: "绑定成功"
    };
  },
  methods: {
    //查看二维码
    linkTo() {
      var shopId = this.shopId;
      var queryData = { code: this.code, shopId: shopId };
      this.$router.push({
        path: "/storeManage/getMoneyQrCode/qrCodeDetail",
        query: queryData
      });
    },
    //收款二维码
    complete() {
      var shopId = this.shopId;
      this.$router.push({
        path: "/storeManage/getMoneyQrCode",
        query: { shopId: shopId }
      });
    }
  },
  created: function() {
    var shopId = this.$route.query.shopId;
    var code = this.$route.query.code;
    this.shopId = shopId;
    this.code = code;
  },
  components: {
    customHeader,
    result
  }
};
</script>
